package com.hc.service;

import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.BusinessActionContextParameter;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;

@LocalTCC
public interface NongUserService {

    @TwoPhaseBusinessAction(name = "nong", commitMethod = "commit", rollbackMethod = "cancel")
    void reduceMoney(BusinessActionContext context, @BusinessActionContextParameter("userId") int userId, @BusinessActionContextParameter("money") double money);


    void commit(BusinessActionContext context);

    void cancel(BusinessActionContext context);

}
